package com.zmn.oms.business.interfaces.conf.channel;

import com.zmn.oms.common.dro.conf.channel.ConfChannelWorkOrderTypeDRO;
import com.zmn.oms.common.dro.conf.channel.ConfOrderChannelDRO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.entity.conf.channel.ConfOrderChannel;
import com.zmn.oms.model.entity.conf.channel.ConfOrderChannelQuery;
import com.zmn.oms.model.vo.conf.channel.ConfOrderChannelVO;

import java.util.List;

/**
 * 类描述: 渠道订单参数配置 逻辑处理类
 *
 * @author: liudi
 * @since: 2022/02/18 11:13
 */
public interface ConfOrderChannelBService {


	/**
	 * 描述: 根据渠道ID查询渠道订单配置
	 *
	 * @param channelId 渠道ID
	 * @return ConfOrderChannel
	 */
	ConfOrderChannelDRO getByChannelId(Integer channelId) throws OmsBaseException;

	/**
	 * 根据渠道ID查询工单完成控制，工单取消控制，特殊优惠控制信息
	 *
	 * @param channelId
	 * @return ConfOrderChannel
	 */
	ConfChannelWorkOrderTypeDRO getWorkOrderTypeByChannelId(Integer channelId) throws OmsBaseException;

	/**
	 * 分页搜索
	 *
	 * @param query
	 * @return
	 */
	List<ConfOrderChannelVO> listPageByQuery(ConfOrderChannelQuery query);

	/**
	 * 根据后台录单状态，查询出所有符合条件的渠道ID
	 *
	 * @param hiddenStatus 后台录单状态
	 * @return 符合条件的渠道ID集合
	 */
	List<Integer> listChannelIdByHiddenStatus(Integer hiddenStatus);

	/**
	 * 根据渠道ID集合查询渠道订单配置
	 *
	 * @param channelIds 渠道ID集合
	 * @return List<ConfOrderChannel>
	 */
	List<ConfOrderChannel> listConfOrderChannelByChannelIds(List<Integer> channelIds);

	/**
	 * 根据渠道ID获取是否通知工程师（工单超时预警后）
	 *
	 * @param channelId
	 */
	boolean checkNotifyEngineer(Integer channelId);

	/**
	 * 修改渠道订单配置
	 *
	 * @param confOrderChannel
	 * @return
	 */
	void modifyOrderConfig(ConfOrderChannel confOrderChannel);
}
